<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
    echo heading("Extrato",4,"class='divisor'");		
        $id = $this->uri->segment(3);
        $query = $this->ContaModel->getIdConta($id)->row();
	$id_conta = $query->id_conta;
	$descricao = $query->descricao;
            			
    $atributos_formulario = array('class' => 'form-signin', 'id'=>'formcadastro');
    echo form_open ("contaController/chamarTelaExtrato/$id/",$atributos_formulario);
    if(validation_errors())
    { echo '<div class="alert alert-danger">
        	<button type="button" class="close " data-dismiss="alert">&times;</button>
                <span>'.validation_errors().'</span>
          	</div>';
    }
    if($this->session->flashdata('cadastrook')):
	echo "<div class=alerta>";
        echo "<p class='validacoes'>".$this->session->flashdata('cadastrook')."</p>";
	echo "</div>";
    endif;
    echo form_label('Conta para Extrato::','conta');
    echo form_input(array('name'=>'id_conta','id'=>'id_conta','type'=>'hidden'),  set_value('id_conta',$id_conta));
    echo form_input(array('name'=>''),  set_value('descricaoContaPai',$descricao) ,'disabled="disabled"');
    echo br();
    echo form_label('Data Início ::');
    echo '<div id="datetimepicker" class="input-append date datetimepicker">';
    echo form_input(array('name'=>'data_inicio','id'=>'data_inicio','class'=>'input-xsmall date','placeholder'=>'Data','value' => date('d/m/Y')),  set_value('data_inicio'),'autofocus');
    echo '<span class="add-on">
          <i data-time-icon="icon-time" data-date-icon="icon-calendar"></i>
          </span>
          </div>';
    echo br();
    echo form_label('Data Fim ::');
    echo '<div id="datetimepicker" class="input-append date datetimepicker">';
    echo form_input(array('name'=>'data_fim','id'=>'data_fim','class'=>'input-xsmall date','placeholder'=>'Data','value' => date('d/m/Y')),  set_value('data_fim'));
    echo '<span class="add-on">
          <i data-time-icon="icon-time" data-date-icon="icon-calendar"></i>
          </span>
          </div>';
    
    echo br();
    $btnGravar = array(     'name' => 'button',
                            'id' => 'button',
                            'value' => 'true',
                            'type' => 'submit',
                            'content' => 'Gravar',
                            'class' => 'btn btn-primary'
                        );
   echo form_button($btnGravar);
   echo nbs(4);                                
   $btnLimpar = array('name' => 'button', 'id' => 'button', 'value' => 'true', 'type' => 'reset', 'content' => 'Limpar', 'class' => 'btn btn-primary');
   echo form_button($btnLimpar);
   echo nbs(4);
   echo anchor("PrincipalController/",' Voltar ', array('title' =>'Voltar para principal', 'class' => 'btn btn btn-danger'));
   echo form_close();
  ?>
			  		    